package com.example.pos;

import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import java.util.Calendar;

public class QtdbActivity extends AppCompatActivity {

    TextView tv_time;
    TextView tv_sid;
    Intent intent;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_qtdb);
        intent = getIntent();
        String str_usn = intent.getStringExtra("usn");

tv_time=findViewById(R.id.tv_time);
        tv_sid=findViewById(R.id.tv_sid);
        Calendar cal= Calendar.getInstance();
        int y=cal.get(Calendar.YEAR);
        int m=cal.get(Calendar.MONTH)+1;
        int d=cal.get(Calendar.DATE);
        int h=cal.get(Calendar.HOUR_OF_DAY);
        int mi=cal.get(Calendar.MINUTE);
        int s=cal.get(Calendar.SECOND);

        tv_time.setText(y+"-"+m+"-"+d+" "+h+":"+mi+":"+s);

        tv_sid.setText(str_usn);
    }
}